USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0002_TIPO_CREDITO]    Script Date: 11/24/2011 14:37:25 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0002_TIPO_CREDITO]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0002_TIPO_CREDITO]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0002_TIPO_CREDITO]    Script Date: 11/24/2011 14:37:25 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[WASP_M0002_TIPO_CREDITO] 
AS 
BEGIN 
	SELECT	cre.aosuc
			,cre.aooper
			,cre.aocta
			,tope.Tonom AS TIPCRED
	INTO	dbo.tipo_credito_mc
	FROM	fsd010 AS cre (NOLOCK)
			,fst004 AS tope (NOLOCK) 
	WHERE	cre.aosbop = 0
	and		cre.aooper <> 999999999
	-- and	cre.Aostat <> 99
	AND		cre.Aomod  = tope.Modulo
	AND		cre.Aotope = tope.totope 
	AND		cre.aotasa <> 0
END

GO


